package com.lantosec.hmrp.modules.warning.vo;

import com.lantosec.hmrp.modules.warning.entity.WarningType;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 *  VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-05-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="WarningType对象", description="")
public class WarningTypeVO extends BaseVO<WarningType> {
    private static final long serialVersionUID = 1L;


    public WarningTypeVO(WarningType entity){
        this.typeId = entity.getTypeId();
        this.typeName = entity.getTypeName();
        this.parentId = entity.getParentId();
        this.flag = entity.getFlag();
        this.leaf = entity.getLeaf();
        this.typeOrder = entity.getTypeOrder();
    }

    @Override
    public WarningType convertToEntity(){
        return new WarningType(this);
    }


    @ApiModelProperty(value = "预警类型ID")
    private String typeId;

    @ApiModelProperty(value = "预警类型名称")
    private String typeName;

    @ApiModelProperty(value = "类型上级ID")
    private String parentId;

    @ApiModelProperty(value = "删除标识")
    private Integer flag;

    @ApiModelProperty(value = "排序")
    private Integer typeOrder;

    @ApiModelProperty(value = "末级")
    private Integer leaf;

}
